package com.xuxueli.applyModules.entity;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @CLassName ServiceGroupInfo
 * @Description TODO
 * @Version 1.0
 **/

/**
 * 员工对象
 * <p>
 * 注解：@Document用来声明Java对象与ElasticSearch索引的关系
 * indexName 索引名称
 * type      索引类型
 * shards    主分区数量，默认5
 * replicas  副本分区数量，默认1
 * createIndex 索引不存在时，是否自动创建索引，默认true*/
@ApiModel(value = "ServiceGroupDictionaryInfo对象", description = "服务组信息")
@Document(indexName = "service_group_dictionary_info", type = "servicegroupdictionaryinfo")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ServiceGroupDictionaryInfo implements Serializable {

    @Id
    private Long id;

    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String groupName;

    @Field(type = FieldType.Long)
    private Long dictionaryInfoId;

    @Field(type = FieldType.Long)
    private Long departmentId;


    //0:未上架,1:已上架
    @Field(type = FieldType.Integer)
    private Integer status;

    @Field(type = FieldType.Float)
    private Float score;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String groupBrief;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String groupIntroduction;

    @Field(type = FieldType.Long)
    private Long createTime;

    // 计费方式,1:免费,2:按调用量计费,3:按实际费用计费,4:套餐包,5:包年包月"
    @Field(type = FieldType.Text)
    private Integer chargeType;

    //已开通的服务数量
    @Field(type = FieldType.Long)
    private BigDecimal serviceCount;

    //服务调用数量
    @Field(type = FieldType.Long)
    private BigDecimal serviceCallerCount;

    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String dictionaryValue;
}